home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
c_lib.arc
/
FLSETDTA.C
< prev
next >
Wrap
Text File
|
1990-08-09
|
1KB
|
48 lines
/**
*
* Name flsetdta -- Set the Disk Transfer Area (DTA) location
*
* Synopsis ercode = flsetdta(pdta_ads);
* int ercode DOS function return code
* ADS *pdta_ads Segment, offset address for the DTA
*
* Description Many of the DOS functions use the Disk Transfer Area
* for buffering I/O and other functions (see DRSFIRST).
* The DTA is a 128 bytes buffer, and this function sets
* its location to the area pointed to by the segment offset
* address in pdta_ads.
*
* Returns ercode DOS function return code (always 0).
*
* Version 1.1 (C)Copyright Blaise Computing Inc. 1983, 1984
*
**/
struct segads /* Segment,offset address type */
{
unsigned r;
unsigned s;
};
#define ADS struct segads /* Abbreviation */
struct dreg
{
unsigned ax,bx,cx,dx,si,di,ds,es;
};
#define DOSREG struct dreg
int flsetdta(pdta_ads)
ADS *pdta_ads;
{
DOSREG dos_reg;
int utinit(),dos();
utinit(&dos_reg); /* Initialize registers */
dos_reg.ax = 0x1a00; /* DOS function 1A */
dos_reg.ds = pdta_ads->s;
dos_reg.dx = pdta_ads->r;
return(dos(&dos_reg));
}